import yagmail
import logging
import csv

def duqu(file):
    with open(file,newline='',encoding='utf-8') as a:
        return [row for row in a]

def log_set():
    logging.basicConfig(level=logging.DEBUG, format='%(message)s', filename='log.txt', filemode='w')

def sent(file):
    em=yagmail.SMTP(user='2834326498@qq.com',password='ersutdeapgbedgej',host='smtp.qq.com')
    em.send(to='2834326498@qq.com',subject='月考',contents='请查收',attachments=file)